/*global define $win:true*/
define(["jquery"], function($) {
    function PageSignCalendar(params) {
        this.params = params;
        this.signValue = new Array();
    }

    PageSignCalendar.prototype.initDom = function() {

    };

    PageSignCalendar.prototype.initData = function() {
        var _this = this;
        var xhrArray = new Array();
        var jqXHR = $win.getData({
            "url": {
                "local": "/test/page/signCalendar",
                "remote": "/test/page/signCalendar"
            }
        }, function(result) {
            if (result.success) {
                var signStrArray = result.value.split(",");
                for (var i = 0; i < signStrArray.length; i++) {
                    var obj = {};
                    obj.signDay = signStrArray[i];
                    _this.signValue.push(obj);
                }
            } else {
                $.MessageAlert({
                    "content": "请求数据失败"
                });
                _this.dataErrorArray.push(true);
            }
        });
        xhrArray.push(jqXHR);
        return xhrArray;
    };

    PageSignCalendar.prototype.initEvent = function() {
        var _this = this;
        $("#signCalendar").unbind("click").bind("click", function() {
            $.SignCalendar(_this.signValue);
        });
    };

    return PageSignCalendar;
});
